home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / fish / 001-100 / 001-025 / 014 / amiga3d / threed.h < prev   
C/C++ Source or Header  |  1995-03-17  |  2KB  |  111 lines

  1. #define UP 0
  2. #define DOWN 1
  3. #define OFF 0
  4. #define ON 1
  5.  
  6. #define LEFT 32 
  7.  
  8. #define NTSC_TOP 4
  9. #define PAL_TOP 0
  10.  
  11. #define WIDTH 256
  12.  
  13. #define NTSC_HEIGHT 192
  14. #define PAL_HEIGHT 256
  15.  
  16. #define TMPWIDTH 512
  17. #define TMPHEIGHT 512
  18.  
  19. #define NTSC_MAXHINOLACE 200
  20. #define PAL_MAXHINOLACE 256
  21.  
  22. #define NTSC_MAXHILACE 400
  23. #define PAL_MAXHILACE 512
  24.  
  25. #define N_BIT_PLANES 3
  26. #define MAXNUMCOLORS 32
  27. #define MAXNUMARGS 16
  28.  
  29. #define SINA 0x0400
  30. #define COSA 0x3FE0
  31. #define SINB 0x0100
  32. #define COSB 0x3FFE
  33.  
  34. #define NULLPROC 0
  35. #define ADDVECT   1
  36. #define SUBVECT 2
  37. #define ROLL 3
  38. #define PITCH 4
  39. #define YAW 5
  40. #define TRANSPOSE 6
  41.  
  42. struct UV 
  43. {
  44.     WORD uv11;
  45.     WORD uv12;
  46.     WORD uv13;
  47.     WORD uv21;
  48.     WORD uv22;
  49.     WORD uv23;
  50.     WORD uv31;
  51.     WORD uv32;
  52.     WORD uv33;
  53. };
  54.  
  55. struct Coordinate
  56. {
  57.     WORD x;
  58.     WORD y;
  59.     WORD z;
  60. };
  61.  
  62. struct Polygon
  63. {
  64.     WORD vertexcount;
  65.     struct Coordinate *(*vertexstart)[];
  66.     struct Coordinate *normalvector;
  67.     WORD polycolor;
  68. };
  69.  
  70. struct Object
  71. {
  72.     struct Object *nextobject;
  73.     struct Object *subobject;
  74.     struct UV *umatrix;
  75.     struct Coordinate *position;
  76.     WORD pointcount;
  77.     struct Coordinate *(*pointstart)[];
  78.     WORD normalcount;
  79.     struct Coordinate *(*normalstart)[];
  80.     WORD polycount;
  81.     struct Polygon *(*polystart)[];
  82.     APTR procedure;
  83. };
  84.  
  85. struct Objectinfo {
  86.     struct Objectinfo *nextobjectinfo;
  87.     struct Objectinfo *subobjectinfo;
  88.     struct UV *objectmatrix;
  89.     struct Coordinate *objectposition;
  90.     WORD objectnumpoints;
  91.     struct Coordinate **objectpoints;
  92.     WORD objectnumnormals;
  93.     struct Coordinate **objectnormals;
  94.     WORD objectnumpolys;
  95.     struct Polygon **objectpolys;
  96.     struct UV *displaymatrix;
  97.     struct Coordinate *displayposition;
  98.     WORD objectbufpointsize;
  99.     struct Coordinate *objectbufpoints;
  100.     WORD objectbufnormalsize;
  101.     struct Coordinate *objectbufnormals;
  102.     WORD pptrbufsize;
  103.     struct Coordinate *pptrbuf;
  104.     WORD nptrbufsize;
  105.     struct Coordinate *nptrbuf;
  106.     WORD colorbufsize;
  107.     struct WORD *colorbuf;
  108.     APTR objectprocedure;
  109. };
  110.  
  111.